package com.coolw.thread.test;

/**
 * MyCounter
 *
 * @author coolw
 * @date 2024/5/8 19:10
 */
public class MyCounter {

    static int counter = 0;

    public synchronized void increase() {
        counter++;

        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
